package com.ajz.manager.api;

import javax.inject.Inject;
import javax.servlet.http.HttpServletRequest;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.ajz.common.constants.SwaggerApiConstant;
import com.ajz.common.dto.Result;
import com.ajz.config.AppUserUtil;
import com.ajz.manager.service.MemberService;
import com.ajz.manager.service.OrdOrderService;

import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

/**
 * 
 * <p> 订单</p>
 *
 * @author xyj
 * @date 2018年11月14日
 */
@RestController
@RequestMapping("/api/order")
public class OrderController {
	@Inject
	private OrdOrderService ordOrderService;
	/**
	 * 发布订单
	 * @param request
	 * @return
	 */
	@ApiOperation(value = SwaggerApiConstant.MEMBER_INFO)
	@GetMapping(value = "/info")
	@ApiImplicitParams({ @ApiImplicitParam(name = "Authorization", value = "TOKEN", paramType = "header") })
	public Result memberInfo(HttpServletRequest request) {
		return Result.successResult(AppUserUtil.getUser(request));
	}
//	/**
//	 * 发布订单
//	 * @param request
//	 * @return
//	 */
//	@ApiOperation(value = SwaggerApiConstant.MEMBER_INFO)
//	@GetMapping(value = "/info")
//	@ApiImplicitParams({ @ApiImplicitParam(name = "Authorization", value = "TOKEN", paramType = "header") })
//	public Result memberInfo(HttpServletRequest request) {
//		return Result.successResult(AppUserUtil.getUser(request));
//	}
}
